extends PropertyFindSetter


class_name BooleanSetter
"""
修改bool值
"""


## 需要设置的值
@export_enum("true:1", "false:0", "reverse:-1") var value: int


func __get_update_value(w: Object, p: String) -> Variant:
    # 反转值
    if value < 0:
        return not (w.get(p) as bool)
    return true if value else false
